// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "SlowTime.generated.h"


UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class MISCELLANEOUSPROJECT_API USlowTime : public UActorComponent
{
	GENERATED_BODY()

public:	
	USlowTime();

protected:
	virtual void BeginPlay() override;

public:
	UFUNCTION(BlueprintCallable, Category = TimeAndSpace)
	void ActivateAbility();
private:
	void DeactivateAbility();
	void LerpStart();

private:
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = TimeAndSpace, meta = (AllowPrivateAccess = "true"))
	float SlowMotionValue;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = TimeAndSpace, meta = (AllowPrivateAccess = "true"))
	bool IncludePlayer;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = TimeAndSpace, meta = (AllowPrivateAccess = "true"))
	bool Lerp;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = TimeAndSpace, meta = (AllowPrivateAccess = "true"))
	float LerpSpeed;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = TimeAndSpace, meta = (AllowPrivateAccess = "true"))
	FPostProcessSettings PPSettings;

	float CurrentValue;
	bool IsSlowTimeActive;
	class ACharacter* Character;	
	FTimerHandle UniqueHandle;
};
